//
//  TOTOTableViewCell.m
//  Qyer
//
//  Created by 赵宇 on 15/9/11.
//  Copyright (c) 2015年 赵宇. All rights reserved.
//

#import "TOTOTableViewCell.h"
#import "BaseHeader.h"
#import "TOTOTOCollectionViewCell.h"
@implementation TOTOTableViewCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        UICollectionViewFlowLayout *flow = [[UICollectionViewFlowLayout alloc]init];
        flow.itemSize = CGSizeMake(SCREEN_WIDTH / 7*3.3, SCREEN_WIDTH / 3.5);
        flow.sectionInset = UIEdgeInsetsMake(0, 5, 5, 5);
        flow.scrollDirection = UICollectionViewScrollDirectionHorizontal;
        
        _collection = [[UICollectionView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_WIDTH / 3) collectionViewLayout:flow];
        [_collection setBackgroundColor:[UIColor whiteColor]];
        [self.contentView addSubview:self.collection];
        
        [_collection registerClass:[TOTOTOCollectionViewCell class] forCellWithReuseIdentifier:@"lookHT"];
  
    }
    return self;
}

-(void)setDelegate:(id<UICollectionViewDelegate>)delegate
{
    [self.collection setDelegate:delegate];

}
-(void)setDataSource:(id<UICollectionViewDataSource>)dataSource
{
    [self.collection setDataSource:dataSource];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
